import java.lang.reflect.Method;

public class Test2 {
    public static void main(String[] args) throws Exception {
        Class<?> aClass = Class.forName("SomeService");
        Method declaredMethod = aClass.getDeclaredMethod("dosome", String.class, int.class);

        Object hello = declaredMethod.invoke(aClass.newInstance(), "hello", 1);
        System.out.println(hello);
    }
}
